import 'package:center_beijing/common/http_util.dart';

//获取构件类型
getComponentType(params) async {
  var responseJson = await HttpUtil().get("rheaservice/api/compkind/listname",params:params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

//获取构件详情
getComponentDetail(compId) async {
  var responseJson = await HttpUtil().get("rheaservice/api/orderCompInfo/"+compId);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


//获取构件生产工序
getWorkStage(compId) async {
  var responseJson = await HttpUtil().get("rheaservice/api/componentmesssage/workStageByCompId/"+compId);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

//根据具体工序查询工序填写表单
getCheckItem(workStageId) async {
  var responseJson = await HttpUtil().get("rheaservice/api/checkitem/getCheckItem/"+workStageId);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

//获取模台列表
getMoTaiList(projectId) async {
  var responseJson = await HttpUtil().get("rheaservice/api/pedestal/project/"+projectId);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


//获取当前工厂的构件
getCurrentFactoryComponent(params) async {
  var responseJson = await HttpUtil().get("rheaservice/api/orderCompInfo/putInWarehouseComp",params:params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

//获取当前工厂可报废构件
getCurrentFactoryScrapComp(params) async {
  var responseJson = await HttpUtil().get("rheaservice/api/orderCompInfo/getCanScrapComp",params:params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


//报废构件
scrapApproval(params) async {
  var responseJson = await HttpUtil().post("rheaservice/api/componentWaterState/scrapComp",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

//构件报废审核
scrapAudit(params) async {
  var responseJson = await HttpUtil().post("rheaservice/api/componentWaterState/scrapApprove",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


//构件报废审核
scrapAudit2(params) async {
  var responseJson = await HttpUtil().post("bim/irest/base/ccbim_elementScrapInfoHandler/saveScrapInfo",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


//获取版本
getAppVersion(params) async {
  var responseJson = await HttpUtil().get("rheaservice/api/dics/datas?type=app_version");
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}
